package com.daohang.generator.manager.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import net.chenlin.dp.common.entity.Page;
import net.chenlin.dp.common.entity.Query;
import com.daohang.dh.dao.MidpCusProjRelationMapper;
import com.daohang.dh.entity.MidpCusProjRelationEntity;
import com.daohang.dh.manager.MidpCusProjRelationManager;

/**
 * 客户项目关系表
 *
 * @author xiaomei
 * @email yczclcn@163.com
 * @url www.chenlintech.com
 * @date 2018/05/23
 */
@Component("midpCusProjRelationManager")
public class MidpCusProjRelationManagerImpl implements MidpCusProjRelationManager {

	@Autowired
	private MidpCusProjRelationMapper midpCusProjRelationMapper;
	

	@Override
	public List<MidpCusProjRelationEntity> listMidpCusProjRelation(Page<MidpCusProjRelationEntity> page, Query search) {
		return midpCusProjRelationMapper.listForPage(page, search);
	}

	@Override
	public int saveMidpCusProjRelation(MidpCusProjRelationEntity midpCusProjRelation) {
		return midpCusProjRelationMapper.save(midpCusProjRelation);
	}

	@Override
	public MidpCusProjRelationEntity getMidpCusProjRelationById(Long id) {
		MidpCusProjRelationEntity midpCusProjRelation = midpCusProjRelationMapper.getObjectById(id);
		return midpCusProjRelation;
	}

	@Override
	public int updateMidpCusProjRelation(MidpCusProjRelationEntity midpCusProjRelation) {
		return midpCusProjRelationMapper.update(midpCusProjRelation);
	}

	@Override
	public int batchRemove(Long[] id) {
		int count = midpCusProjRelationMapper.batchRemove(id);
		return count;
	}
	
}
